<style>
<?php for ($i = 0; $i < count($this->priorityList); $i++) {?>
.priority_list [label = "<?=$this->priorityList[$i]['value']?>"]
{
	background:url(<?php echo $this->baseUrl().$this->priorityList[$i]['icon_url']?>) no-repeat;
}
<?php }?>
 #userscontainer {position:absolute;top:1.7em;width:25em;}
    #userscontainer .yui-ac-content {position:absolute;width:100%;height:11em;border:1px solid #404040;background:#fff;overflow:hidden;z-index:9050;}
    #userscontainer .yui-ac-shadow {position:absolute;margin:.3em;width:100%;background:#a0a0a0;z-index:9049;}
    #userscontainer ul {margin-top:0px; padding:0px 0;width:100%;}
    #userscontainer li {padding:0 0px;cursor:default;white-space:nowrap;}
    #userscontainer li.yui-ac-highlight {background:#000033;color:#ffffff}
</style>
<table width="100%" cellspacing="0" cellpadding="0">
	<tbody>
		<tr>
		<td width="200" valign="top">
			<table width = "100%" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0">
				<tr>
					<td>
						<table border="0" cellpadding="3" cellspacing="0" width="100%" style="border-bottom:1px solid blue">
							<tbody>
								<tr>
									<td bgcolor="#dddddd">
								<span style="float: left;"><b>Issue Details</b></span></td>
								</tr>
							</tbody>
						</table>					</td>
				</tr>
				<tr>		
					<td>
						<table border="0" cellpadding="3" cellspacing="0" width="100%">
							<tbody>
								<tr>
									<td valign="top"><b>Key:</b></td>
									<td valign="top"><?=$this->data['pkey']?></a></b></td>
								</tr>
				
								<tr>
									<td valign="top"><b>Type:</b></td>
									<td valign="top">
										<img src= "<?=$this->baseUrl().$this->data['issueTypeIcon']?>" title="<?=$this->data['issueTypeName']?>"/>&nbsp;<?=$this->data['issueTypeName']?>									</td>
								</tr>
				
								<tr>
									<td valign="top"><b>Status:</b></td>
									<td valign="top">
										<img src= "<?=$this->baseUrl().$this->data['issueStatusIcon']?>" title="<?=$this->data['issueStatusName']?>"/>&nbsp;<?=$this->data['issueStatusName']?>									</td>
								</tr>
								<tr>
									<td valign="top"><b>Priority:</b></td>
									<td valign="top">
										<img src= "<?=$this->baseUrl().$this->data['priorityIcon']?>" title="<?=$this->data['priorityName']?>"/>&nbsp;<?=$this->data['priorityName']?>									</td>
								</tr>
								<tr>
									<td valign="top"><b>Assignee:</b></td>
									<td valign="top"><a href="#"><?=$this->data['assignee']?></a></td>
								</tr>
								<tr>
									<td valign="top"><b>Reporter:</b></td>
									<td valign="top"><a href="#"><?=$this->data['reporter']?></a></td>
								</tr>
							</tbody>
						</table>				  </td>
				</tr>
		  </table>		</td>
		<td valign="top">
		<br>
		<table width="90%" align="center" bgcolor="#bbbbbb" cellspacing="0" style="border:1px solid #bbbbbb">
			<tr bgcolor="#f0f0f0">
				<td style="border-bottom:0px">
						<h3 style="margin:3px 0 0 5px;height:30px">Edit Issue</h3>
						<div>Use this form to edit the fields of this issue.</div>
				</td>
			</tr>
			<tr>
				<td bgcolor="#ffffff">
				<?php
					echo $this->form;
				?>
				</td>
			</tr>
		</table>
		</td>
		</tr>
	</tbody>
</table>
<script type="text/javascript">

YAHOO.example.ACJSFunction = function(){
    //var mylogger;
    var oACDS;
    var oAutoComp;

    return {
        init: function() {

            // Instantiate JS Function DataSource
			var oACDS = new YAHOO.util.XHRDataSource("<?=$this->baseUrl()?>/issue/users");
			oACDS.responseSchema = {
				resultsList: "items",
				fields: ["username", "fullname", "email",]
			};
			oACDS.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;

            // Instantiate AutoComplete
            oAutoComp = new YAHOO.widget.AutoComplete('reporter','userscontainer', oACDS);
            oAutoComp.alwaysShowContainer = false;
            oAutoComp.queryDelay = 0;
            oAutoComp.maxResultsDisplayed = 8;

            oAutoComp.formatResult = function(oResultItem, sQuery) {
                 var sMarkup = oResultItem[1] + " " + oResultItem[2] + " (" + oResultItem[0] +") ";
				return (sMarkup);
            };
			oAutoComp.doBeforeExpandContainer = function(oTextbox, oContainer, sQuery, aResults) {
				var pos = YAHOO.util.Dom.getXY(oTextbox);
				pos[1] += YAHOO.util.Dom.get(oTextbox).offsetHeight + 2;
				YAHOO.util.Dom.setXY(oContainer,pos);
				return true;
			};


        	},				
			// Subscribe to Custom Events
				//oAutoComp.dataReturnEvent.subscribe(YAHOO.example.ACJSFunction.myOnDataReturn);


        	// Define Custom Event handlers
        	myOnDataReturn: function(sType, aArgs) {
				var oAutoComp = aArgs[0];
				var sQuery = aArgs[1];
				var aResults = aArgs[2];
	
				if(aResults.length == 0) {
					oAutoComp.setBody("<div id=\"statescontainerdefault\">No matching results</div>");
				}
        }
    };
}();

YAHOO.util.Event.addListener(this,'load',YAHOO.example.ACJSFunction.init);
</script>